package com.cyz.dao;

import java.sql.SQLException;
import java.util.List;

import com.cyz.pojo.Product;

public interface ProductDao {
	public Product getProductById(Integer id)throws SQLException;
	/**
	 * @param typeName
	 * @return
	 * @throws SQLException
	 */
	public List<Product> getProductByTypeName(String typeName) throws SQLException;
	public Integer getProductIdByProductName(String ProductName);
	public Product getProductByProductName(String ProductName); 
	/////////////////////////
	public void addType(String typeName);
	public void deleteType(String typeName);
	public void updateType(String typeName,String newName);
	public String getTypeByName(String typeName);//通过名字查找名字是否存在
	public Integer getTypeIdByTypeName(String typeName);
	public void deleteProduct(String productName);
	public void addProduct(Product product);
	public void updateProduct(Product product);
} 
